package com.cssl.controller;


import com.cssl.domain.DtsAd;
import com.cssl.domain.dto.DtsAdDto;
import com.cssl.openFeign.DtsAdClient;


import com.cssl.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/promotion")
public class DtsAdController {

    @Autowired
    private DtsAdClient dtsAdClient;

    @PostMapping("/listAd")
    public Result getlistAd(@RequestBody DtsAdDto dto) {

        return dtsAdClient.getlistAd(dto);

    }

    @PostMapping("/createAd")
    public Result createAd(@RequestBody DtsAd dto) {
       return dtsAdClient.createAd(dto);
    }
}
